package thread;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class ThreadDemo1 {

    public static void main(String[] args) throws InterruptedException{
        BlockingQueue<String> blockingQueue = new LinkedBlockingQueue<>();
        blockingQueue.put("hello");
        System.out.println(blockingQueue.take());
        System.out.println(blockingQueue.take());
    }
}
